<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="format-detection" content="telephone=no" />
		<meta name="wap-font-scale" content="no" />
		<title>词条收集</title>
		<link rel="stylesheet" type="text/css" href="/css/public.css" />
		<link rel="stylesheet" type="text/css" href="/css/collect.css" />
		<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="/js/iscroll.js"></script>
		<script type="text/javascript" src="/js/common.js"></script>
		<script>
			$(document).ready(function() {

				$(".menu_box li:eq(2)").addClass("choose_menu");
				var Request = GetRequest();
				if (Request) {
					$("input[name='word']").val(Request["word"]);
				}

				//處理標籤多選功能
				$(".tag_list").find("em").click(function() {
					$(this).toggleClass("choose_tag");
					var s = $(".tag_list").find(".choose_tag");
					var n = s.length;
					var tmp = new Array();
					for (var i = 0; i < n; i++) {
						tmp[i] = s.eq(i).attr("id").split("_")[1];
					}
					$("#tags").val(tmp.join("/"));
					//alert($("#tags").val());
					//return true;
				});

				$("#tab1").click(function() {
					$(this).addClass("choose_btn");
					$("#tab2").removeClass("choose_btn");
					$("#hak_words").show();
					$("#both_words").hide();
					$("#tab_link").attr("href", "hakka_words.php");
				});

				$("#tab2").click(function() {
					$(this).addClass("choose_btn");
					$("#tab1").removeClass("choose_btn");
					$("#both_words").show();
					$("#hak_words").hide();
					$("#tab_link").attr("href", "hak_pth_words.php");
				});

				$("input[name='word']").change(function() {
					var word = $(this).val();
					$.post("search_word.php", {
							word: word,
							place: "mx"
						},
						function(data, status) {
							//alert("Data: " + data + "nStatus: " + status);
							obj_chaci = eval("(" + data + ")");
							var count = obj_chaci.count;
							if (count > 0) alert("已存在，请尝试其它词。承蒙！");
						});
				});
			});

			/**************************页面载入时获取url的参数值****************************/
			function GetRequest() {
				var url = location.search; //获取url中"?"符后的字串
				var theRequest = new Object();
				if (url.indexOf("?") != -1) {
					var str = url.substr(1);
					strs = str.split("&");
					for (var i = 0; i < strs.length; i++) {
						theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
					}
				} else {
					return false;
				}
				return theRequest;
			}
		</script>
	</head>

	<body>

		<div class="outBox">

			<!--页头 开始-->
			<div class="head">
				<div class="head_in mtIn">
					<div class="drop_menu_btn"></div>
					<div class="mobile_menu_title"></div>
					<div class="head_left">
						<div class="menu_box">
							<i class="close_menu_box"></i>
							<div class="menu_box_in" id="drop_menu">
								<ul>
									<li><a th:href="@{/index.html}">辞典</a></li>
									<li><a href="/hakka/tutorial.html">教材</a></li>
									<li><a href="/hakka/collect.html">词条收集</a></li>
									<li><a href="/hakka/mandarin_to_hakka.html">客普翻译</a></li>
									<li><a href="/hakka/hanzi_to_pinyin.html">线上注音</a></li>
									<li><a href="/hakka/languageRegion.html" target="_blank">语言地区</a></li>
									<!--									<li><a href="/hakka/voice.html">语音搜索</a></li>-->
									<li><a href="/hakka/hot.html">网址导航</a></li>
									<li><a href="/hakka/museum.html">客家博物馆</a></li>
									<!--									<li><a href="/hakka/voice.html">语音搜索</a></li>-->
									<!-- <li><a href="./hakka/ime/typewriting.htm">输入法</a></li> -->
									<!--li><a href="/hakka/bbs/" target="_blank">讨论</a></li-->

								</ul>
							</div>
						</div>
					</div>
					<div class="head_right">
						<ul class="head_right_list">
							<li><a href="/login.html">登录</a></li>
							<li class="register_btn"><a href="/register.html">注册</a></li>
						</ul>
					</div>
				</div>
			</div>
			<!--页头 结束-->

			<div class="content mtIn">
				<div class="content_top">
					<div class="title">客家话词条收集</div>
					<div class="collect_info">
						<p>为了制作客语通用教材、客语输入法，在 chuntse
							等网友之倡议下，设立此请求页。<br />本词库为网友共建，其内容可自由复杂、转载，使用时注明出处即可。<br />复杂的查询需求可使用 「 <a
								href="searchwords.php">高级搜索页面</a> 」。</p>
					</div>
				</div>
				<div class="content_down">

					<!--创建表单 开始-->
					<div class="fm_box">
						<form method="post" action="save_addwords.php" onsubmit="return checkform()" name="form">
							<ul class="fm_list">
								<li>
									<span>新词条</span>
									<div class="inp_box">
										<input name="word" type="text" maxlength="15" />
									</div>
								</li>
								<li>
									<span>读音</span>
									<div class="inp_box">
										<input name="pronunc" type="text" maxlength="20" />
									</div>
								</li>
								<li>
									<span>含义说明</span>
									<div class="testarea_box">
										<textarea name="zht"></textarea>
									</div>
								</li>
								<li>
									<span>例句</span>
									<div class="testarea_box">
										<textarea name="sentence"></textarea>
									</div>
								</li>
								<li>
									<span>所属分类</span>
									<div name="cate" class="area_sel">
										<em class="sel_box">客语</em>
										<select name="cate">
											<option value="1">客语</option>
											<option value="2">普语</option>
											<option value="3">共用</option>
										</select>
									</div>
								</li>
								<li>
									<span>标签</span>
									<div class="tag_list">
										<input type="hidden" name="tags" id="tags" />
										<em id="tag_1">事物</em>
										<em id="tag_2">行为</em>
										<em id="tag_3">形容词</em>
										<em id="tag_4">副词</em>
										<em id="tag_5">前綴</em>
										<em id="tag_6">后綴</em>
										<em id="tag_7">代词</em>
										<em id="tag_8">时间</em>
										<em id="tag_9">饮食</em>
										<em id="tag_10">天文</em>
										<em id="tag_11">位所</em>
										<em id="tag_12">量词</em>
										<em id="tag_13">虛词</em>
										<em id="tag_14">连词</em>
										<em id="tag_15">称谓</em>
										<em id="tag_16">谚语</em>
										<em id="tag_17">抽象概念</em>
										<em id="tag_18">医卫</em>
										<em id="tag_19">地名</em>
										<em id="tag_20">人名</em>
										<em id="tag_21">其他</em>
									</div>
								</li>
								<li>
									<span>所在地区</span>
									<div class="inp_box">
										<input name="place" type="text" maxlength="5"
											placeholder="请具体到市县，例如惠阳、赣县、新竹…" />
									</div>
								</li>
								<li>
									<span>你的姓名</span>
									<div class="inp_box">
										<input name="author" type="text" maxlength="10" />
									</div>
								</li>
								<li>
									<span>联系方式</span>
									<div class="inp_box">
										<input name="contact" type="text" maxlength="100" />
									</div>
								</li>
							</ul>
							<div class="sub_btn">
								<button>提交</button>
							</div>
						</form>
					</div>
					<!--创建表单 结束-->
				</div>
			</div>

	</body>
</html>
